Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

speech: add missing import for code sample #1898

Merged
merged 2 commits into from
Jan 25, 2019
Merged

Conversation

anguillanneuf
Copy link
Member

No description provided.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Dec 5, 2018
@anguillanneuf anguillanneuf changed the title Add missing import for code sample speech: add missing import for code sample Dec 5, 2018
@@ -28,7 +28,10 @@
def transcribe_file_with_enhanced_model(path):
"""Transcribe the given audio file using an enhanced model."""
# [START speech_transcribe_enhanced_model]
import io
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This import exists at the top of the file.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@beccasaurus Should we also move standard imports inside the functions for imports or just leave them outside.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ones like IO for reading files are 👍 – folks will find it helpful so things don't blow up

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good. @anguillanneuf
I'd say we should just make sure we remove the import above then and replace it inside the function where needed. :)

Copy link
Contributor

@engelke engelke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@engelke engelke merged commit e1050fc into master Jan 25, 2019
@anguillanneuf anguillanneuf deleted the anguillanneuf-patch-1 branch February 7, 2019 21:52
busunkim96 pushed a commit to busunkim96/python-speech that referenced this pull request Sep 1, 2020
busunkim96 pushed a commit to googleapis/python-speech that referenced this pull request Sep 3, 2020
atulep pushed a commit to googleapis/google-cloud-python that referenced this pull request Apr 6, 2023
atulep pushed a commit to googleapis/google-cloud-python that referenced this pull request Apr 6, 2023
atulep pushed a commit to googleapis/google-cloud-python that referenced this pull request Apr 18, 2023
parthea pushed a commit to googleapis/google-cloud-python that referenced this pull request Oct 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants